//对象的解构赋值
let {a,b} = {a:"11",b:"22"};

console.info(a);

//将对象的方法赋值到变量上
var classA = {
    methodA : function(){
        console.info("methodA");
    }
}

let {methodA} = classA;

methodA();

// 变量名称与属性名称不一致

let obj = {first:"f_1",last:"l_2"};
//变量名称是f，l
let {first:f,last:l} = obj;

console.info(f,l);


//字符串
let {length: len} = "hello";

let [a1,a2] = 'hello';

console.info(len);

console.info(a1);

